package cn.hd.commonService.utils;

import cn.hutool.core.convert.Convert;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {


    /**
     * @param mills
     * @return
     * 将毫秒转化为指定格式的时间字符串
     */
    public static String longToStr(long mills){
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date = Convert.toDate(mills);
        return   df.format(date);
    }
}
